/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class PortableAirConditioner {
    static categoryCode = '010030044';

    static categoryName = '移动空调';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return PortableAirConditioner.categoryCode;
    }

    get categoryName() {
        return PortableAirConditioner.categoryName;
    }

    getCurrentTemperature(params) {
        return command({
            method: 'getCurrentTemperature',
            methodId: 'pDrhF8Gl',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMode(params) {
        return command({
            method: 'getMode',
            methodId: 'p3deo9HU',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pdN7zE8w',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTemperature(params) {
        return command({
            method: 'getTemperature',
            methodId: 'pgh0mcd5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWindDirection(params) {
        return command({
            method: 'getWindDirection',
            methodId: 'ptRS9I4P',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWindRange(params) {
        return command({
            method: 'getWindRange',
            methodId: 'phEqKYPm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWindSpeed(params) {
        return command({
            method: 'getWindSpeed',
            methodId: 'pkp1qnFC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMode(params) {
        return command({
            method: 'setMode',
            methodId: 'pGoxHJ9M',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'pZgRTTan',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTemperature(params) {
        return command({
            method: 'setTemperature',
            methodId: 'peH3nLDI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setWindDirection(params) {
        return command({
            method: 'setWindDirection',
            methodId: 'pUPQ8Vj9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setWindRange(params) {
        return command({
            method: 'setWindRange',
            methodId: 'ppAXISTE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setWindSpeed(params) {
        return command({
            method: 'setWindSpeed',
            methodId: 'p1vFj2oK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default PortableAirConditioner;
